#!/usr/local/bin/bash

cd ../..
MMBASEpath=`pwd`
ORIONpath=/usr/local/install/orion

cd $ORIONpath
LD_LIBRARY_PATH=$MMBASEpath/lib
export LD_LIBRARY_PATH
export CLASSPATH

# While starting MMBase you can give MMBase four arguments
# -Dmmbase.config tells MMBase where to find the configuration files.
# -Dmmbase.htmlroot tells MMBase where to find the HTML root.
# -Dmmbase.outputfile tells MMBase to which file the output has to be redirected
# 		if this argument is ommited the output will be redirected to your screen.
# -Dmmbase.userlevel tells MMBase to which userlevel it has to switch
# 		this argument is used when you have to start mmbase with under 'root'
#		to be able to connect port 80, but after connecting to port 80 you want
#		MMBase to run under userid x.
#
# For more information about the arguments read MMBase argument in the system
# administration section at the www.mmbase.org site.

while [ 1==1 ]; do
echo 'Starting MMBase at ' `date`
java -Dmmbase.config=$MMBASEpath/config/default \
     -Dmmbase.htmlroot=$ORIONpath/default-web-app/ \
     -Dmmbase.outputfile=$MMBASEpath/log/mmbase.log \
	 -jar orion.jar 
done
